<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="dialog-layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
			$(function() {
				$(".tr-user").click(function() {
					var name = $(this).find("td:eq(0)").html();
					var title = $(this).find("td:eq(1)").html();
					var id = $(this).find("input").val();

					art.dialog.opener.selectUser({
						title : title,
						id : id,
						name : name
					});
				});
			});
		</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<div>每页${users.size}项，共 ${users.totalElements} 项，当前${users.number+1}/ ${users.totalPages}页</div>
		<table class="table table-hover table-condensed">
			<thead>
				<tr>
					<th>名称</th>
					<th>说明</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="#users" var="user">
					<tr class="tr-user">
						<td>${user.name}<input type="hidden" value="${user.id}" /></td>
						<td>${user.title}</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		<jsp:include page="/components/pagination/paginations.jsp"></jsp:include>
	</tiles:putAttribute>
</tiles:insertDefinition>